package com.glsc.ngateway.common.api.flowable.dto.demand.node;

public enum ProcessNodeStatus {


    /**
     * 已经走完的节点
     */
    FINISH("1"),

    /**
     * 待办节点
     */
    TODO("0"),

    /**
     * 未办节点
     */
    UNDO("");

    private String nwCode;

    private ProcessNodeStatus(String nwCode) {
        this.nwCode = nwCode;
    }

    public String getNwCode() {
        return nwCode;
    }

    public static ProcessNodeStatus getProcessNodeStatus(String nwcode) {

        for (ProcessNodeStatus processNodeStatus : ProcessNodeStatus.values()) {
            if (processNodeStatus.getNwCode().equalsIgnoreCase(nwcode)) {
                return processNodeStatus;
            }
        }
        return ProcessNodeStatus.UNDO;
    }


}
